using System;

namespace DotNetWarrior.NetMF.IO
{
    [Serializable]
    public class TinyFileSystemException : Exception
    {
        public enum TfsErrorCode
        {
            NotFormatted = -1,
            FileInUse = -2,
            DiskFull = -3,
            InvalidCluster = -4
        }

        public TinyFileSystemException()
        {
        }

        public TinyFileSystemException(string message)
            : base(message)
        {
        }

        public TinyFileSystemException(string message, TfsErrorCode errorCode)
            : base(message)
        {
            ErrorCode = errorCode;
        }

        public TinyFileSystemException(string message, Exception innerException)
            : base(message, innerException)
        {
        }

        public TfsErrorCode ErrorCode { get; private set; }
    }
}